<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        body,html {
            height: 100%;
        }
        ul {
            list-style: none;
            height: 100%;
            width: 100%;
            position: absolute;
            top:0px;
        }
        ul li {
            height: 100%;
            width: 100%;
        }
        ol {
            list-style: none;
            position: fixed;
            top: 80px;
            left: 50px;
        }
        ol li {
            width: 50px;
            height: 50px;
            border: 1px solid #000;
            text-align: center;
            line-height: 50px;
            margin-top: -1px;
            cursor: pointer;
        }
        a{
            /*color:white;*/
            font-size: 18px;
            text-decoration: none;
        }
    </style>
</head>
<body>
<ul>
    <li class="d-toJump">鞋子区域</li>
    <li class="d-toJump">袜子区域</li>
    <li class="d-toJump">裤子区域</li>
    <li class="d-toJump">裙子区域</li>
    <li class="d-toJump">帽子区域</li>
</ul>
<ol>

</ol>
<!--楼层跳跃============开始-->
<!--楼层跳跃============结束-->
<script src="jquery-1.11.1.js"></script>
<script>
    $(function(){
//    //实现楼层跳跃效果
        //根据类数量动态创建楼层li
        $(".d-toJump").each(function (index) {
            console.log($("ul>li").eq(index).text());
            var n=$("ul>li").eq(index).text();
            //创建li
            $("ol").append($('<li><a href="javascript:0">'+(index+1)+"层"+'</a></li>'));
            //$("ol").append($('<li><a href="javascript:0">'+n+'</a></li>'));

        });
        var color = ["pink", "blue", "yellow", "orange", "green"];
        for (var i = 0; i < $("ul>li").length; i++) {
            $("ul>li").get(i).style.backgroundColor = color[i];
            $("ol>li").get(i).style.backgroundColor = color[i];
        }
    });
</script>


</body>
</html>